Skip to content

Chain buys go to root + Root is motivated to actively manage alpha + Root flows tracking#2

Open
igoraxz wants to merge 1 commit into
mainfrom
only-keep
Open

Chain buys go to root + Root is motivated to actively manage alpha + Root flows tracking#2
igoraxz wants to merge 1 commit into
mainfrom
only-keep

Conversation

@igoraxz
Copy link
Copy Markdown
Owner

@igoraxz igoraxz commented Dec 30, 2025

Motivation

Chain buys are a novel update to Bittensor’s dynamic TAO mechanism: when a subnet’s price‑determined alpha_in exceeds the per‑block threshold, the chain begins to purchase subnet alpha directly. The effect is exciting — it shifts emissions from a purely price‑neutral injection toward a more price‑positive regime where the chain becomes an active buyer.

However, this also opens a new failure mode: chain buys can be exploited by subnets that temporarily game emission computation (notably TaoFlow), trigger a short window of direct chain purchases, and then extract the TAO used to buy the subnet’s alpha. This can be done with minimal outside participation, and often with no intention to produce real value; in practice, such subnets will readily burn miner rewards if that’s what it takes to keep the exploit running.

The solution lies in distribution and policing: there must be a large, diverse set of market participants who can apply a “reality check” to emissions by selling the alpha they receive when a subnet is behaving adversarially. Without such holders, the system loses its primary enforcement mechanism. If alpha ends up concentrated, passively swapped away, or never meaningfully held outside the subnet controller, then there is no credible sell pressure. That makes short‑window manipulation cheap, low‑risk, and an obvious attack vector.

This PR is justified by a simple principle: chain‑bought alpha should be distributed in a way that empowers TAO stakers to act as that check, and the chain should track their behavior as a subnet health indicator. Root dividends are the only scalable ownership externalization channel we have today; how TAO stakers accumulate or exit a subnet’s alpha is therefore the best on‑chain proxy for whether the subnet is earning durable market trust versus manufacturing temporary flows. Importantly, the protocol remains in control of the emissions budget split — keeping baseline funding concentrated in subnets, while ensuring that when chain buys occur (i.e., when the chain becomes a direct buyer and the attack surface increases), a substantial portion of value is routed to root stakers to provide a credible, distributed sell‑side check.

Goals

Add external distributed control to chain buys.
When a subnet triggers chain buys through short‑term manipulation, the resulting alpha must end up in the hands of parties who can sell it back. This creates real downside risk for the manipulator and makes “buy‑then‑drain” materially harder to sustain.

Promote active alpha management by root TAO stakers and diversify strategies.
Root stakers should be able to hold, manage, and exit alpha deliberately. The system should encourage participation and differentiated strategies, rather than a single passive default.

Establish root alpha flows as a subnet health signal that the subnet itself cannot fake.
We track EMAs of root alpha inflow (claims) and outflow (sell/exit) as objective indicators of whether root is accumulating or rejecting a subnet’s alpha. Critically, these indicators remain meaningful even if one entity fully controls a subnet (owner coldkey, validators, miners, and alpha supply), because the signal comes from the externally distributed holder set.

Reduce passive root TAO stakers behavior that masks risk.
Simplifying root claim types (Keep / AutoKeep) reduces configuration complexity and removes the implicit expectation that the network should subsidize fully passive “auto‑swap to TAO” behavior. Instead, it nudges root stakers toward active alpha management, which is the mechanism that makes chain‑buy manipulation costly. The protocol still controls how much budget is routed to root versus subnets — the intent is not to starve subnets, but to ensure that when chain buys happen, the root set has enough distributed inventory to discipline abuse through market action.

Changes

Root claim type simplification, removal of passive "Swap" mode:

  • Reduced root claim settings to Keep and AutoKeep (removed Swap and KeepSubnets).
  • Keep: Manual claiming only (default).
  • AutoKeep: Auto-claiming on block step.
  • Migration sets all existing RootClaimType to Keep on launch.

Chain-bought alpha distribution:

  • Chain-bought alpha is added to PendingRootAlphaDivs instead of being recycled.
  • Allows root TAO stakers to sell when chain buys are manipulated ("runaway" effect caused by attackers).

Root alpha flow metrics:

  • Added SubnetEmaRootAlphaInflow: EMA of root alpha claims (in alpha terms).
  • Added SubnetEmaRootAlphaOutflow: EMA of root alpha claim sells (in alpha terms, root alpha claim is deemed sold based on FIFO-like logic when co-mingled with other alpha in the same coldkey - first alpha out is deemed root outflow).
  • Implemented RootClaimedForEma storage to track claimed root alpha per (netuid, hotkey, coldkey) using FIFO-like logic (first alpha out is deemed root outflow).
  • Uses separate smoothing factor RootAlphaFlowEmaSmoothingFactor for root EMAs.
  • Metrics are reset when subnets are dissolved and initialized for new subnets.
  • Only tracked for non-root subnets.

Technical Details

  • RootClaimedForEma mirrors RootClaimed updates for transfers and clearing, but tracks actual alpha movement (not staking adjustments).
  • Outflow is recorded only when alpha is sold (unstake with swap), not when transferred between wallets.
  • All decreases to RootClaimedForEma occur only inside the helper function decrease_root_claimed_for_ema_when_alpha_leaves.
  • Root flow EMAs are updated in block_step.

- Updated the `run_coinbase` function to accumulate bought alpha for distribution instead of recycling.
- Added new storage types for tracking root alpha inflow and outflow, along with their EMA calculations.
- Modified the staking logic to always keep alpha, removing the swap functionality.
- Implemented functions to record and reset root alpha inflow and outflow.
- Enhanced the transfer logic for root claimed alpha to include EMA tracking.
- Updated migration scripts to accommodate changes in root claim types and alpha handling.
@igoraxz igoraxz changed the title Switch to keep only to boost dTao activity, introduce root alpha dividends EMA tracking as subnet health metric Chain buys go to root + Root is motivated to actively manage alpha + Root flows tracking Dec 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant